home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 January / macformat-020.iso / Shareware City / Applications / Alpha.5.96 folder / Help / LaTeX Help < prev    next >
Encoding:
Text File  |  1994-09-17  |  55.1 KB  |  1,203 lines  |  [TEXT/ALFA]

  1. NOTE: This is the help file for latex.tcl v2.3 (compatible with LaTeX 2e). 
  2.       For backward compatibility with LaTeX 2.09, install latex.tcl v2.0
  3.       by choosing 'install:latex' on the Utils menu.
  4.  
  5. ===========================================================================
  6. ALPHA LaTeX MACROS
  7. ===========================================================================
  8.  
  9. This is the "LaTeX Help" file available from Alpha's Help menu.  To 
  10. navigate this file quickly, activate the window's mark menu by pressing 
  11. the '{}' icon on the toolbar at the right.
  12.  
  13.  
  14. Documentation
  15. -------------
  16.  
  17. Besides this Help file, there is also the file "LaTeX Key Bindings" on the 
  18. Help menu which contains an alphabetical listing of all the command keys 
  19. bound to the various LaTeX commands.  In addition to these on-line help 
  20. files, there are other documentation files stored in Alpha's LaTeX folder 
  21. (in both the "LaTeX 2.09" and "LaTeX 2e" folders).  For example, numerous 
  22. tables summarizing the content of the LaTeX menu are contained in the file 
  23. "latex_commands.tex".  Essentially the same information, but in an 
  24. abbreviated form, will be found in "latex_keys.tex".  Both are LaTeX 
  25. documents which you can view or print with your favorite LaTeX application.
  26.  
  27.  
  28. The LaTeX Menu
  29. --------------
  30.  
  31. When entering TeX mode, either manually (by choosing 'TeX' from the pop-up 
  32. mode menu on the toolbar at the right) or automatically (whenever a .tex or 
  33. .sty file is activated), a new menu appears in the menu bar.  The LaTeX 
  34. menu provides access to scores of procedures stored in source form in a 
  35. file called latex.tcl loaded automatically the first time 'TeX' mode is 
  36. entered.  The LaTeX menu follows closely the organization and terminology 
  37. of L. Lamport's _LaTeX: A Document Preparation System_ [second edition, 
  38. Addison-Wesley, 1994], especially chapter 3.  Many people agree that the 
  39. _LaTeX_ book is still the definitive LaTeX reference and, in conjunction 
  40. with _The LaTeX Companion_ by Goossens, Mittlebach and Samarin 
  41. [Addison-Wesley, 1994], constitutes the "official" LaTeX2e documentation.  
  42. These books, as well as Knuth's classic _TeXbook_ [Addison-Wesley, 1986], 
  43. should be on every serious LaTeX user's desk.
  44.  
  45.  
  46. LaTeX2e
  47. -------
  48.  
  49. Beginning with version 2.2, latex.tcl supports LaTeX2e, a superset of 
  50. LaTeX 2.09.  LaTeX2e will compile a 2.09 document automatically, using 
  51. what is called "compatibility mode".  Most of the LaTeX 2.09 commands and 
  52. environments have been preserved in 2e, making the transition from 2.09 to 
  53. 2e (from the user's point of view, at least) relatively painless.
  54.  
  55. For those who have not yet upgraded to LaTeX2e, the old LaTeX 2.09 macros 
  56. are still available.  Just choose 'install:LaTeX' on the Utils menu and 
  57. follow the prompts to install the other version.  Note, however, that all 
  58. present and future enhancements to the Alpha LaTeX macros will be directed 
  59. towards LaTeX2e users, and so you are encouraged to upgrade as soon as 
  60. possible.
  61.  
  62.  
  63. Installation
  64. ------------
  65.  
  66. Alpha is configured to use the LaTeX macros right out of the box, so there 
  67. is no installation process per se.  But there are a number of flags and 
  68. variables that control the inner workings of latex.tcl which may be changed 
  69. at the user's discretion.  Simply press the "flag" icon on the toolbar to 
  70. the right to see the list of possibilities.
  71.  
  72.    wordwrap --- if true, the program automatically inserts a carriage
  73.      return as the cursor nears the end of the line (defined by the 
  74.      variable 'fillcolumn'); otherwise, the line extends to the right 
  75.      indefinitely.  By default, 'wordwrap' is turned on in TeX mode.
  76.      
  77.    useStatusBar --- determines whether or not the status bar is to be 
  78.      used when prompting for user input.  (The status bar is a long, 
  79.      thin message area at the bottom of your screen.)  Alpha's status 
  80.      bar is enabled in TeX mode, by default.  See the related flag 
  81.      'promptNoisily' below.
  82.      
  83.    optionIsMeta --- if true, the option key is used as a meta key (see
  84.      the section entitled "Meta Keys" below); otherwise, the option key 
  85.      is used as an ordinary modifier key.  Against Pete's better judgement, 
  86.      this flag is set to false, by default.
  87.     
  88.    useDollarSigns --- support is provided for both the TeX and LaTeX 
  89.      methods of invoking math mode (see the Math Modes submenu for the 
  90.      various options).  But only one of these is bound to command keys 
  91.      (which are <Cmd Opt $> and <Shf Cmd Opt $> by default), and this is 
  92.      what the flag 'useDollarSigns' is for.  If set to true, latex.tcl 
  93.      uses dollar signs to delimit math mode ( $...$ and $$...$$ ); 
  94.      if false, LaTeX notation will be used ( \(...\) and \[...\] ).  
  95.      By default, 'useDollarSigns' is set to false---the LaTeX way of 
  96.      doing things.
  97.     
  98.    searchNoisily --- latex.tcl searches the current document for a 
  99.      variety of reasons.  If the search fails, and 'searchNoisily' 
  100.      is set to true, the program displays a message on the status bar 
  101.      and beeps.  If, on the other hand, 'searchNoisily' is set to false, 
  102.      only the message is displayed.  By default, 'searchNoisily' is set 
  103.      to true.
  104.     
  105.    promptNoisily --- some environment commands prompt the user for input. 
  106.      As mentioned above, if 'useStatusBar' is set to true, the prompt is 
  107.      displayed on the thin status bar at the bottom of the screen.  This 
  108.      is less obtrusive than an alert, but may go unnoticed at first, so 
  109.      if 'promptNoisily' is set to true (which it is, by default) and
  110.      'useStatusBar' has been enabled, the program beeps prior to 
  111.      displaying the prompt.  You can turn off this annoying sound by 
  112.      invoking the "flag" pop-up menu on the toolbar at the right and 
  113.      removing the tick on 'promptNoisily'.  
  114.     
  115.    deleteObjectNoisily --- one of the basic latex.tcl operations (see 
  116.      the section "Basic Operations" below) is to insert an object into 
  117.      the current document.  If, at the time the insertion command is 
  118.      issued, there is a selection (i.e., highlighted text), then the 
  119.      program behaves differently depending on the value of the flag 
  120.      'deleteObjectNoisily'.  If set to true, the user will be prompted 
  121.      before any selected text is deleted; if, on the other hand, this flag 
  122.      is false, then the selection is replaced quietly and without warning 
  123.      (although it may be undone).  By default, 'deleteObjectNoisily' is 
  124.      set to true.  NOTE: Not all objects are "inserted" into the document 
  125.      since sometimes there is an attempt to "wrap" the current selection.  
  126.      See the section "Basic Operations" and the file "latex_commands.tex" 
  127.      for more information.
  128.     
  129.    deleteEnvironmentNoisily --- before an environment is inserted into the 
  130.      document, the program checks to see if there is a selection.  If so, 
  131.      and the flag 'deleteEnvironmentNoisily' is set to true, the user is 
  132.      asked whether or not the current selection should be replaced; 
  133.      if false, the current selection is deleted without warning.  The 
  134.      default value of 'deleteEnvironmentNoisily' has been set to true.  
  135.      As with objects, environments may wrap, so sometimes the current 
  136.      selection (if there is one) is treated differently.  See the section 
  137.      "Basic Operations" and the file "latex_commands.tex" for more 
  138.      information.
  139.     
  140.    useBoxMacro --- if true, the body of a figure environment consists of a 
  141.      call to the box-making macro stored in the variable 'boxMacroName' 
  142.      (see below); if false, the body of a figure environment is left blank 
  143.      unless there is a current selection, in which case the selection is 
  144.      wrapped.
  145.   
  146.    boxMacroName --- the name of the box-making macro to use in the body 
  147.      of the figure environment.  Has no effect, of course, if the flag
  148.      'useBoxMacro' (see above) is set to false.  The default value of 
  149.      'boxMacroName' is "BoxedEPSF", the name of a TeX macro defined as 
  150.      part of the boxedeps package written by Laurent Siebenmann.  There 
  151.      are, of course, other box-making macros one could use, but none, 
  152.      perhaps, is as cross-platform compatible as boxedeps.  (Not everyone 
  153.      will agree with this assessment, and that is why we made sure that 
  154.      the value of 'boxMacroName' can be easily changed.)
  155.    
  156.    funcExpr --- in TeX mode, 'funcExpr' is a regular expression used to 
  157.      search for a subsection header (see the commands 'nextSubsection' 
  158.      and 'prevSubsection' on the Goto submenu).
  159.  
  160.    funcExprAlt --- a regular expression used to search for a section 
  161.      header (see the commands 'nextSection' and 'prevSection' on the 
  162.      Goto submenu).
  163.    
  164.    prefixString --- used in conjunction with the 'insertPrefix' and 
  165.      'removePrefix' commands on the Convert:Strings submenu.  In TeX
  166.      mode, this string is set to "% " which makes 'insertPrefix' very 
  167.      useful for commenting out blocks of LaTeX code.
  168.    
  169.    wordBreak, wordBreakPreface --- see the explanations in Alpha's
  170.      "Intro" file on the Help menu.
  171.  
  172. All of the above flags and variables are listed on the "flag" pop-up menu 
  173. on the toolbar at the right.  Other flags and variables (such as 
  174. 'fillcolumn' mentioned earlier) may be added to the list by choosing 
  175. 'changeList' from the "flag" menu.
  176.  
  177. One useful installation trick that you might want to put in your 
  178. "userStartup.tcl" is the following:
  179.  
  180.    bind 't' <cs> {newMode TeX}
  181.  
  182. With this binding, it's easy to invoke TeX mode no matter where you are or 
  183. what you're doing.  Using this command key definition---regardless of the 
  184. file you're currently editing---select 'New' from the File menu (or press 
  185. <Cmd N>) and then <Cmd Shf T> to conjure up LaTeX mode and the LaTeX menu.
  186.  
  187.  
  188. Basic Operations
  189. ----------------
  190.  
  191. The macros in latex.tcl revolve around two basic operations called 
  192. 'insertObject' and 'wrapObject'.  Basically, 'insertObject' is a call to 
  193. 'insertText' preceded by the automatic deletion of previously selected text 
  194. (this behavior is easily changed, however, by resetting the flag 
  195. 'deleteObjectNoisily' on the "flag" pop-up menu on the toolbar on the 
  196. right).  For example, if there is no current selection, choosing the 
  197. command 'Greek:alpha' from the LaTeX menu inserts the corresponding LaTeX 
  198. command at the insertion point; otherwise it replaces the current selection 
  199. with the string "\alpha".  In other words, 'insertObject' works just like 
  200. the familiar 'Edit:Paste' command.  It turns out that a good number of the 
  201. commands in latex.tcl rely on 'insertObject', but it's usually faster to 
  202. just type the desired LaTeX command at the keyboard.  (Even faster is to 
  203. use the corresponding command keys...but more on that later.) On the other 
  204. hand, if you forget the syntax of a particular LaTeX command, it's easier 
  205. to look it up on the menu than it is in the _LaTeX_ book.
  206.  
  207. The complementary operation to 'insertObject' is called 'wrapObject'.  The 
  208. difference between the two is the way the latter treats the current 
  209. selection, that is, 'wrapObject' inserts its argument at the insertion 
  210. point (just like 'insertObject'), but if there is a selection, 'wrapObject' 
  211. cuts it out (without effecting the state of the Clipboard) inserting it in 
  212. the middle of the chosen command.  For example, consider the LaTeX menu 
  213. command 'Miscellaneous:footnote'.  This command inserts the string 
  214. "\footnote{}•" (without the double quotes, of course) into the document, 
  215. positioning the insertion point between the pair of braces.  The user then 
  216. types the text to be footnoted and presses the <Tab> key, after which the 
  217. tab stop macro finds (and deletes) the bullet • at the end of the string.  
  218. (Note: use <Opt Tab> to insert a literal tab character into the document.) 
  219. On the other hand, if a selection exists at the time 
  220. 'Miscellaneous:footnote' is issued, the selection itself is surrounded by 
  221. LaTeX's \footnote command, and the insertion point is brought to the end of 
  222. the selection automatically.  Some commands, for better or worse, even go 
  223. so far as to insert the selection into one of several competing positions 
  224. within the command string.  The 'Formulas:fraction' command is a good 
  225. example of this type of behavior.  It assumes the current selection (if 
  226. there is one) is the numerator of the fraction to be typeset, cutting & 
  227. pasting accordingly.
  228.  
  229. The concept of wrapping is carried one step further in the case of an 
  230. environment.  Suppose you want to center an existing tabular environment, 
  231. for example.  Just select the tabular environment to be centered and choose 
  232. 'Environments:center' from the LaTeX menu.  The resulting center 
  233. environment will completely surround the existing tabular environment, 
  234. indenting the latter one tab stop to the right.
  235.  
  236. Not all environments wrap, however.  Those environments whose body is very 
  237. structured (such as enumerate, itemize, description, thebibliography, 
  238. tabular, array, eqnarray, and eqnarray*) do not.  Instead, these 
  239. environments simply insert text into the document.  If there happens to be 
  240. a selection at the time one of these commands is issued, an alert appears 
  241. asking if the selection should be deleted.  To turn this alert off, simply 
  242. toggle the flag 'deleteEnvironmentNoisily' on the "flag" pop-up menu.
  243.  
  244.  
  245. Whitespace
  246. ----------
  247.  
  248. Before continuing, let me say a few words about whitespace.  In virtually 
  249. all cases, superfluous whitespace in command strings has been deleted.  For 
  250. example, objects inserted with 'insertObject' (a sizable portion of 
  251. latex.tcl's functionality) do not routinely insert a trailing space 
  252. character.  Instead, the user must decide whether or not space should 
  253. immediately follow a particular LaTeX control word, as sometimes it's 
  254. needed and sometimes it's not.  Setting 'indentOnCR' on the Mode:Flags 
  255. submenu to false also prevents a lot of extraneous whitespace from being 
  256. inserted into your document, but then it won't look so good!
  257.  
  258.  
  259. ===========================================================================
  260. VERSION HISTORY
  261. ===========================================================================
  262.  
  263. Changes in Version 2.3
  264. ----------------------
  265.  
  266.  • A handy install mechanism (designed and implemented by Tom Pollard) 
  267.  lets the user choose between the old LaTeX macros (aka LaTeX 2.09) 
  268.  and the current version (which is LaTeX 2e-compatible).  Simply choose 
  269.  'install:LaTeX' on the Utils menu to switch versions.
  270.  • Totally redesigned the kernel so that the insertion of LaTeX 
  271.  environments and document templates is faster and less choppy.
  272.  • The 'Typeset' command is now bound to <Cmd T> (thanks, Pete!) and 
  273.  supports version 2.2 of CMacTeX (courtesy of its author, Tom Kiffe).
  274.  • The navigation commands 'bibtex' and 'makeindex' are now on the Goto 
  275.  submenu (compliments of Tom Pollard).
  276.  • Added \textnormal to the Text Style submenu.  It has no corresponding 
  277.  command key, by default.
  278.  • Added 'flushleft' and 'flushright' commands to the Environments 
  279.  submenu on either side of 'center'.
  280.  • Added a new Utilities submenu.  There's a procedure called 'clearTabStops' 
  281.  (bound to <Cmd Tab>) which removes all tab stops, and another proc called 
  282.  'convertDollarSigns' which replaces all dollar signs with appropriate LaTeX 
  283.  syntax (see the "MathModes" section of this document).  Both these commands 
  284.  act on the current document or the current selection (if there is one).  
  285.  Another command called 'loadSymbolPackage' carefully inserts the string 
  286.  "\usepackage{latexsym}" into the current document (see p.42 of the _LaTeX_ 
  287.  book).
  288.  • Added 'smallskip', 'medskip', and 'bigskip' to the Spacing submenu.
  289.  • Modified 'filecontents' on the Documents submenu so that the user is 
  290.  presented with a standard file dialog for selecting the file to be 
  291.  prepended to the current document.
  292.  • Fixed a bug in "latexKeys.tcl" (reported by Christian Konrad 
  293.  <Konrad@dax1.w7.ipp-garching.mpg.de>) that prevented Bib mode from 
  294.  initializing TeX mode.
  295.  • Both the figure and table environments now have optional arguments.
  296.  • Added the flag 'promptNoisily' to the "flags" pop-up menu.
  297.  • Listed many of the corresponding command keys in the "LaTeX Help" 
  298.  file (i.e., this file).
  299.  
  300.  
  301. Changes in Version 2.2
  302. ----------------------
  303.  
  304.  • Improved the messages throughout.  (These can be read from the status 
  305.  line at the bottom of your screen.)
  306.  • Significantly enhanced the letter documentclass template.
  307.  • The 'Typeset' command (formerly called 'Latex') on the LaTeX menu not 
  308.  only switches to the appropriate LaTeX app (Textures and OzTeX are 
  309.  currently supported), but also TeXs the current document automatically, 
  310.  with a single keystroke.  (Thanks to Tom Pollard for assistance.)
  311.  • Interchanged the command keys assigned to 'eqnarray' and 'eqnarrayStar' 
  312.  so that they parallel those assigned to 'displaymath' and 'equation'.  
  313.  As a result, un-numbered equations begin with the <Opt Shf> modifier while 
  314.  numbered equations begin with <Opt Ctl>.  Also, 'eqnarrayStar' comes before 
  315.  'eqnarray' on the Math Environments submenu.
  316.  • Changed the command keys for the 'slide', 'tabular', and 'thebibliography' 
  317.  environments.  (These changes were needed to make way for new environments).  
  318.  See the files "latex_commands.tex" and "latex_keys.tex" for a complete list 
  319.  of command keys suitable for printing.
  320.  • Changed "\documentstyle" to "\documentclass" in the document templates 
  321.  to conform with LaTeX2e syntax.  Added a generic "\usepackage" command to 
  322.  each of the templates.
  323.  • Added the \appendix declaration to the Sectioning submenu.
  324.  • Reorganized the Text Style menu according to LaTeX2e conventions.
  325.  Changed "{\em }" to "\emph{}", "{\it }" to "\textit{}" and "{\sl }" 
  326.  to "\textsl{}", and removed the italic correction on all three (which 
  327.  LaTeX2e now handles automatically).  Also changed "{\sc }" to "\textsc{}", 
  328.  "{\bf }" to "\textbf{}", "{\rm }" to "\textrm{}", "{\sf }" to "\textsf{}", 
  329.  and "{\tt }" to "\texttt{}".  Added \underline (which works in any mode), 
  330.  as well as \textup and \textmd (the default shape and series, 
  331.  respectively).  The latter two commands do not have assigned command 
  332.  keys, by default.
  333.  • Added four new math styles to the Math Style submenu:  "\mathrm", 
  334.  "\mathbf", "\mathsf", and "\mathtt".  Changed the name of "\mit" to 
  335.  "\mathit" and "\cal" to "\mathcal".  Relocated the Math Style submenu 
  336.  higher up on the LaTeX menu.
  337.  • Added support for the new "slides" documentclass, and the associated 
  338.  environments "slide", "overlay", and "note".
  339.  • Implemented the Functions submenu, a menu of 34 log-like functions.
  340.  • Added omicron to the Greek submenu, for completeness.
  341.  • Added many commands, too numerous to mention by name, to the Binary 
  342.  Operations, Relations, Arrows, Symbols, and Large Operators submenus.
  343.  • Some LaTeX2e symbols require the input of a special symbol package.  
  344.  In latex.tcl, before such a symbol is inserted into the text, a macro 
  345.  automatically checks to see if the required symbol package is loaded.  
  346.  If not, the user may opt to have the program install it automatically.
  347.  • Added a Page Layout submenu and macros to insert a title page and 
  348.  abstract.  There is also a 'maketitle' command which inserts a template 
  349.  into the current document and positions it automatically.  (Note:  The 
  350.  "titlepage" style is often used in conjunction with \maketitle.  See the 
  351.  'styles' command on the Documents submenu.)  Other page layout commands 
  352.  have also been added.
  353.  • Fine tuned the insertion macros so that input is less choppy.
  354.  • Command names now mimic their LaTeX2e counterparts as much as possible.
  355.  • Streamlined the code underlying the Delimiters submenu.
  356.  • Added a 'center' command to the Environments submenu.
  357.  • By default, <Cmd Opt $> and <Shf Cmd Opt $> are respectively bound to 
  358.  'latexMath' and 'latexDisplaymath' (previously, these keys were bound 
  359.  to 'texMath' and 'texDisplaymath').  Users wanting to use the old-style 
  360.  dollar signs to invoke math mode should set the flag 'useDollarSigns' to 
  361.  true.
  362.  • TeX mode now recognizes the suffixes .ltx, .dtx and .ins, in addition 
  363.  to .tex and .sty.  (Note that the suffixes are case sensitive, however.)
  364.  • Restored the <Opt 8> keystroke to its default Macintosh setting 
  365.  (which necessitated moving \bullet to <Cmd Opt 8>).  Thus <Opt 8> 
  366.  inserts a literal bullet into the .tex document.  Bullets may be used 
  367.  in conjunction with the tab stop mechanism (<Tab> and <Shf Tab>), and 
  368.  are great for setting "bookmarks", for example.
  369.  • The <Tab> and <Shf Tab> keys now beep if a tab stop is not found.  This 
  370.  can be turned off by setting the 'searchNoisily' flag to false.  (Note:  
  371.  Other search operations in latex.tcl also beep; the 'searchNoisily' flag 
  372.  applies to all of them simultaneously.)
  373.  • Added a proc called 'nthTabStop' (bound to <Ctl Tab>) which generalizes 
  374.  the existing 'nextTabStop' and 'prevTabStop' routines by taking an 
  375.  arbitrary integer argument.
  376.  • Added a new Goto submenu containing the various navigation commands  
  377.  mentioned above.  Also included are commands for moving to and from the 
  378.  next and previous (sub)sections.  (See the docs for the corresponding 
  379.  command keys.)
  380.  • Added more than ten commands to the Boxes submenu, including \fbox, 
  381.  \sbox, \raisebox, \parbox, and \rule.  There's also a new minipage 
  382.  environment.
  383.  • Reorganized and enhanced the Spacing submenu with additional 
  384.  commands, the first half-dozen of which are listed in increasing order 
  385.  of "wideness".  Adjusted the corresponding command keys (all of which 
  386.  are a modified spacebar) so that they more closely match the order of 
  387.  the menu items.
  388.  • To facilitate file transfer, LaTeX2e now has a 'filecontents' 
  389.  environment which contains the source of a LaTeX auxiliary file.
  390.  This new environment is supported in latex.tcl 2.2 on the Documents 
  391.  submenu.  Also on the Documents submenu are new commands for 
  392.  automatically inserting standard LaTeX2e styles and packages.
  393.  • Implemented the International submenu, including most of the symbols 
  394.  and half of the accents.
  395.  • The \mathcal command on the Math Style submenu now checks to see that 
  396.  its argument is upper-case.
  397.  • Broke the latex.tcl source code into four parts:  latex.tcl, 
  398.  latexMode.tcl, latexMenu.tcl, and latexKeys.tcl.
  399.  • Fixed 'wordBreak' and 'wordBreakPreface' (thanks Pete!) so that the 
  400.  leading backslash is now selected when double-clicking a LaTeX command.
  401.  • The flags 'optionIsMeta' and 'useDollarSigns' (on the "flag" pop-up 
  402.  menu) are now dynamic in the sense that they may be changed at any time 
  403.  with immediate effect.
  404.  • Environments which prompt the user for input (enumerate, itemize, 
  405.  description, thebibliography, tabular, array, eqnarray, and eqnarray*) 
  406.  now do so on the status line at the bottom of the screen.
  407.  
  408.  
  409. (Version 2.1, a development version, was never released.)
  410.  
  411.  
  412. Changes in Version 2.0
  413. ----------------------
  414.  
  415.  • The documentation (LaTeX Help and latex_commands.tex) has been totally 
  416.  rewritten.
  417.  • A new, expanded LaTeX menu has been implemented, following closely the 
  418.  organization and terminology of the LaTeX book.
  419.  • Ellipses have been added to LaTeX menu items where appropriate.
  420.  • Macros intelligently respond to the current selection---although
  421.  many objects simply replace the current selection (similar to Paste), 
  422.  others conveniently and automatically wrap themselves around it.  
  423.  Environments automatically wrap themselves around a selection, too.
  424.  • Functionality has been localized in utility macros as much as possible.
  425.  • Standard document types (letter, article, report, and book) have been 
  426.  added.  Simply select some text (or not) before choosing the desired 
  427.  command from the Documents menu.
  428.  • Three flags have been added to the Utils menu:  'useBoxMacro' (which 
  429.  controls the behavior of the figure environment), 'deleteObjectNoisily' 
  430.  (which controls an alert that appears when the current selection is 
  431.  about to be replaced by an object), and 'deleteEnvironmentNoisily' 
  432.  (which controls an alert that appears when the current selection is 
  433.  about to be replaced by an environment).
  434.  • Many new environments have been added (figure, table, verbatim, quote,
  435.  quotation, verse) and some (enumerate, itemize, description, tabular, 
  436.  bibliography, array, eqnarray, and eqnarry*) now prompt the user for 
  437.  the desired number of rows and, in some cases, columns.  The environment 
  438.  body is then constructed automatically.
  439.  • The figure environment now depends on a flag called 'useBoxMacro' on the
  440.  Utils menu.  If this flag is true (which it is by default), then the
  441.  figure environment inserts the string "\\centerline{\\$boxMacroName{•}}"
  442.  into its body.  Otherwise, the body of the figure environment is left
  443.  empty (unless there is a current selection, in which case the figure
  444.  environment wraps).
  445.  • A new, improved fraction macro now parses a selection of the form 
  446.  "numerator/denominator" and then automatically constructs the 
  447.  corresponding displayed fraction.  A selection not containing a  
  448.  "/" is inserted in lieu of the fraction's numerator.
  449.  • Both TeX and LaTeX math modes are supported, including $...$, $$...$$,
  450.  \(...\), and \[...\].  These are inserted into the document horizontal-
  451.  ly.  The corresponding multi-line environments \begin{math}...\end{math} 
  452.  and \begin{displaymath}...\end{displaymath} are also supported and 
  453.  heartily recommended (since these constructs are more easily modified 
  454.  and maintained by the user).
  455.  • There's now a two-parameter nth root, in addition to square root.
  456.  • Arbitrary one- and two-parameter LaTeX commands have been implemented, 
  457.  namely, \<command>{•} and \<command>{•}{•}.  These can be run inter-
  458.  actively, or used as templates for user-defined commands.
  459.  • In addition to sum and integral, numerous "large operators" (product, 
  460.  union, intersection, logical and/or) have been added.
  461.  • The nonumber command has been removed since it only appears in the 
  462.  context of an eqnarray environment.
  463.  • Both the Conjugate and Expected Value commands have been removed since 
  464.  in my (perhaps limited) experience these are nonstandard mathematical 
  465.  notation.
  466.  • Sectioning commands no longer insert a trailing carriage return.
  467.  • The Sum and Integral commands no longer typeset the current selection 
  468.  as the lower limit of the sum or integral.
  469.  • The command texDisplayEqn is no longer supported. Instead, the commands
  470.  MathModes:texDisplaymath and MathModes:latexDisplaymath insert 
  471.  themselves horizontally into the .tex file.  For vertical source code 
  472.  formatting, use MathEnvironments:Displaymath.
  473.  • Extraneous comments preceding each environment have been removed.
  474.  • The command alignEqual has been removed since the separator is now
  475.  inserted automatically into the appropriate environments.
  476.  
  477.  
  478. Changes in Version 1.2
  479. ----------------------
  480.  
  481.  • **IMPORTANT**: KEYBINDINGS NOW DEPENDENT ON optionIsMeta FLAG
  482.  
  483.  • macros shortened through use of movePoint and selReplace utility macros.
  484.  • new macros added: section, subsection, subsubsection, enumerate,
  485.  itemize
  486.  • most short macros handle selected text (i.e. highlight "word", execute
  487.  the boldface command, and you get "{\bf word}").  NOTE: this is 
  488.  OPTIONAL--you can still execute boldface, type "word", and type tab.
  489.  • latex key bindings only performed the first time Tex mode is entered,
  490.  to save time
  491.  • emphasize macro updated
  492.  
  493.  
  494. Changes in Version 1.1
  495. ----------------------
  496.  
  497.  • non-breaking space removed from cite macro
  498.  • slide environment macro added and assigned to o-F9 and c-o-9
  499.  • equation, displaymath, eqnarray, eqnarray*, slide, and general environment
  500.  now indent and no longer insert a blank line if called from column 0.
  501.  • texDisplayEqn ($$...$$) added and bound to o-s-4
  502.  
  503.  
  504. Bugs
  505. ----
  506.  
  507. Comments, suggestions, and bug reports are certainly welcomed.  In fact, 
  508. many of the improvements and features in this version of latex.tcl were 
  509. suggested by Alpha LaTeX users like yourself.  Please contact
  510.  
  511.     Tom Scavo
  512.     616 Westcott St.
  513.     Syracuse, NY 13210 
  514.     USA
  515.     <trscavo@syr.edu>
  516.  
  517. with your ideas and feedback.
  518.  
  519. The following are known bugs in latex.tcl:
  520.  
  521.  • when wrapping, the fraction command does not remove redundant 
  522.  parentheses.
  523.  • 'nthTabStop' on the Goto submenu doesn't validate the user's input.
  524.  • 'styles' assumes the \documentclass statement already has an optional 
  525.  parameter (which it does if the document template was inserted via the 
  526.  LaTeX menu).
  527.  • none of the environment commands that prompt for the number of rows or 
  528.  columns validates the user's input.
  529.  
  530.  
  531. Future Enhancements
  532. -------------------
  533.  
  534. Here's a list of things that I've thought about, but haven't got around 
  535. to.  If there's something here that catches your eye, drop me a line and 
  536. I'll move it up a notch on the priority list.
  537.  
  538.  • an interactive list-making command
  539.  • interactive (re)newcommand, (re)newenvironment, and newtheorem commands
  540.  • a tabbing environment (yuck!)
  541.  • an index environment
  542.  • support for the AMS math fonts
  543.  • the ability to "unwrap" fractions and other complex objects
  544.  • support for other keyboards (AZERTY, for example)
  545.  • dynamic itemize, enumerate, and description environments
  546.  • the ability to remove ordinary delimiters
  547.  • multi-line big delimiters
  548.  • 'stackrel' should wrap on its second argument
  549.  • somehow implement \| (that is, "||")
  550.  • tiny icons for each of the items on the Greek submenu
  551.  • support for the "graphics" package
  552.  • support for the "color" package
  553.  • a 'selectEnvironment' command (tough!)
  554.  • more command keys on the menus (please ask Pete :-)
  555.  • put 'boxMacroName' on the Boxes submenu
  556.  • dream up a set of command keys for the Font Size submenu
  557.  • menu commands that dim out of context (tough!)
  558.  • support for AMS-LaTeX
  559.  
  560.  
  561. ===========================================================================
  562. MENUS
  563. ===========================================================================
  564.  
  565. The LaTeX menu is organized into four parts: general commands, 
  566. document-related commands, paragraph mode commands (that is, normal text 
  567. commands), and math mode commands.  Each group of commands is separated by 
  568. a thin grey line on the LaTeX menu.  The order of the commands on any 
  569. give submenu is significant insofar as possible.  For example, the 
  570. various commands on the Environments submenu mirror the corresponding 
  571. command keys, while submenus such as Relations and Arrows follow exactly 
  572. the ordering found in the _LaTeX_ book.  We'll try to point out these 
  573. organizational aids as we go along.
  574.  
  575. A brief description of each available command follows.  See the file 
  576. "latex_commands.tex" for summary info.
  577.  
  578.  
  579. Navigation Commands
  580. -------------------
  581.  
  582.   Typeset  <Cmd T>
  583.  
  584. If you use Textures, OzTeX or CMacTeX, you'll be happy to know that Alpha 
  585. and LaTeX now work better together.  To typeset the file you're currently 
  586. editing in Alpha, simply choose 'typeset' from the LaTeX menu or press 
  587. <Cmd T>.  Alpha first checks to make sure that any changes to the file have 
  588. been saved, then switches to LaTeX and typesets the file---automatically.
  589.  
  590. The inverse operation, switching from LaTeX to Alpha, depends on which 
  591. LaTeX app you're using.  OzTeX users simply choose 'edit' from OzTeX's Edit 
  592. menu or press <Cmd E> to return to Alpha.  (By the way, typing "e" in 
  593. response to a LaTeX error message in the OzTeX window throws you back into 
  594. Alpha at the offending line.  The same trick works in CMacTeX, too.)
  595.  
  596.   Goto:LaTeX  <Cmd ->
  597.  
  598. This command switches to your favorite LaTeX app *without* saving and 
  599. typesetting the current document.  It is identical to the old 'latex' 
  600. command in v2.0.
  601.  
  602.   Goto:BibTeX
  603.   Goto:MakeIndex
  604.  
  605. These commands switch to the corresponding Macintosh application.
  606.  
  607.   Goto:nextTabStop  <Tab>
  608.   Goto:prevTabStop  <Shf Tab>
  609.  
  610. As you build your document using the various commands on the LaTeX menu, 
  611. templates are inserted into the text complete with tabstops (represented by 
  612. bullets, which are also inserted with <Opt 8>).  The idea is to enter an 
  613. argument at the current tab stop, press <Tab> to go to the next tab stop, 
  614. enter another argument, press <Tab> again, and so on.  That's what 
  615. 'nextTabStop' and 'prevTabStop' do: they move around from tab stop to tab 
  616. stop.  Since 'nextTabStop' and 'prevTabStop' are bound to the <Tab> and 
  617. <Shf Tab>, respectively, the menu commands aren't as convenient as simply 
  618. pressing the tab key---they're included on the LaTeX menu for completeness.
  619.  
  620. NOTE:  Press <Opt Tab> to insert a literal tab into the document.
  621.  
  622.   Goto:nthTabStop  <Ctl Tab>
  623.  
  624. This command generalizes 'nextTabStop' and 'prevTabStop'.  The user is 
  625. prompted for an integer (positive or negative) which specifies which tab 
  626. stop to go to (relative to the cursor position).
  627.  
  628.   Goto:nextSection  <Shf Kpad3>
  629.   Goto:prevSection  <Shf Kpad1>
  630.  
  631. These commands are useful for navigating large files with many sections 
  632. and/or chapters.  They utilize the regular expression 'funcExprAlt' on the 
  633. "flag" pop-up menu (which, of course, may be modified).
  634.  
  635.   Goto:nextSubsection  <Kpad3>
  636.   Goto:prevSubsection  <Kpad1>
  637.  
  638. These commands are similar in function to 'nextSection' and 'prevSection' 
  639. except that they also stop at each \subsection and \subsubsection as well.  
  640. Uses 'funcExpr' on the "flag" pop-up menu (which may also be modified).  In 
  641. TeX mode, these commands take the place of Alpha's generic 'nextFunc' and 
  642. 'prevFunc', and are bound to the same command keys (<Kpad3> and <Kpad1>, 
  643. respectively).
  644.  
  645.   Utilities:clearTabStops  <Cmd Tab>
  646.  
  647. The 'clearTabStops' command removes all tab stops (bullets) from the 
  648. current document (or the current selection, if there is one).
  649.  
  650.   Utilities:convertDollarSigns
  651.  
  652. Plain TeX uses dollar signs to delimit math mode and displaymath mode.  
  653. Since LaTeX inherits most (all?) of plain TeX's functionality, dollar signs 
  654. work in LaTeX documents, too.  But identical left and right delimiters are 
  655. difficult to parse, and so any error messages will be misleading at best.  
  656. That is why LaTeX has its own math mode delimiters and why they should be 
  657. used.  The 'convertDollarSigns' command will replace all dollar signs in 
  658. the current document (or the current selection, if there is one) with 
  659. appropriate LaTeX syntax.  It does this by making two passes over the 
  660. code, and is therefore kind of slow on large documents.
  661.  
  662.  
  663. Document-related Commands
  664. -------------------------
  665.  
  666.   Documents:letter
  667.  
  668. The most complex of all the document templates: includes tab stops for the 
  669. letter's mailing address, return address, salutation, closing, etc.
  670.  
  671.   Documents:article
  672.   Documents:report
  673.   Documents:book
  674.   Documents:slides
  675.  
  676. Choosing one of these document templates from the Documents submenu either 
  677. inserts the desired template at the insertion point or, if there is a 
  678. current selection---say, a paragraph of text or an entire document---the 
  679. selection is wrapped up inside the chosen template.  In either case, the 
  680. insertion point is positioned at the beginning of the template where the 
  681. user enters any specific style options that may be required (standard 
  682. options include "11pt", "twoside" and "twocolumn", for example).  If none 
  683. are desired, simply skip over this part of the template (it's okay to leave 
  684. the empty square brackets where they are).  See the command 
  685. 'Documents:styles' below for more information on style options.
  686.  
  687.   Documents:custom...
  688.  
  689. In addition to the standard LaTeX documentclasses (letter, article, report, 
  690. book, and slides) a custom documentclass that queries the user for the 
  691. name of the class is provided. 
  692.  
  693.   Documents:styles...
  694.  
  695. Presents the user with a dialog box and a list of standard styles.  
  696. Choosing one of these or typing a custom style name into the text box of 
  697. the dialog automatically inserts the chosen style into the current document 
  698. at the appropriate place.
  699.  
  700.   Documents:packages...
  701.  
  702. Like 'styles', this command gives a list of standard packages from which 
  703. to choose.
  704.  
  705.   Documents:filecontents...
  706.  
  707. To facilitate file transfer, LaTeX2e now has a 'filecontents' environment 
  708. which contains the source of a LaTeX auxiliary file.  Issuing this command 
  709. brings up a standard file dialog.  After locating the file to be included, 
  710. latex.tcl wraps the contents of this file inside a filecontents 
  711. environment, and inserts it at the beginning of the current document.
  712.  
  713.   PageLayout:maketitle
  714.  
  715. LaTeX's \maketitle command formats a title page with information provided 
  716. by the user.  Choosing this command from the LaTeX menu inserts a template 
  717. into the current document just after the \begin{document} command.
  718.  
  719.   PageLayout:abstract
  720.   PageLayout:titlepage
  721.  
  722. 'abstract' and 'titlepage' are environments containing the text of an 
  723. abstract and title page, respectively.  The latter differs from 
  724. \maketitle in that the user is totally responsible for the format of the 
  725. title page.
  726.  
  727.   PageLayout:pagestyle...
  728.   PageLayout:thispagestyle...
  729.   PageLayout:pagenumbering...
  730.  
  731. The 'pagestyle' and 'thispagestyle' commands control what appears in the 
  732. header and footer of the current document.  The user is presented with a 
  733. list of standard formats from which to choose.  The 'pagenumbering' command 
  734. is for choosing the style of the page numbers, and is also interactive.
  735.  
  736.   PageLayout:twocolumn
  737.   PageLayout:onecolumn
  738.  
  739. These are simple declarations that tell LaTeX to begin formatting the 
  740. output in two or one column format, respectively.
  741.  
  742.   Sectioning:part
  743.   Sectioning:chapter
  744.   Sectioning:section
  745.   Sectioning:subsection
  746.   Sectioning:subsubsection
  747.   Sectioning:paragraph
  748.   Sectioning:subparagraph
  749.  
  750. All LaTeX sectioning commands are available from the Sectioning submenu, 
  751. the most common being the chapter, section, and subsection commands.  The 
  752. corresponding LaTeX command is inserted at the insertion point.  The 
  753. current selection, if there is one, is assumed to be the name of the 
  754. section and wrapped up inside curly braces.  The resulting declaration 
  755. is NOT automatically followed by a carriage return since the user has the 
  756. option of putting a label (or whatever) on the same line.
  757.  
  758.   Sectioning:appendix
  759.  
  760. Unlike the other sectioning commands, this command does not have an 
  761. argument.  It simply tells LaTeX to start numbering differently.  
  762. The \appendix declaration only makes sense in the context of a long 
  763. document such as a book.
  764.  
  765.  
  766. Paragraph Mode Commands
  767. -----------------------
  768.  
  769. The following eleven commands take an argument, namely, the text to be 
  770. formatted in the given style.  For large amounts of text, use the  
  771. corresponding declarations on p.37 of the _LaTeX_ book.
  772.  
  773.   TextStyle:emph  <Cmd Shf E>
  774.  
  775. Short for "emphasized", this command is perhaps the most-used LaTeX text 
  776. style.  If the surrounding text has the upright shape (see below), then 
  777. LaTeX typesets emphasized text in italics.  If the surrounding text is 
  778. italicized, then emphasized text will be upright.
  779.  
  780.   TextStyle:underline  <Cmd Opt U>
  781.  
  782. Although underlined text is not used much anymore, the corresponding 
  783. command is included here for completeness.  The 'underline' command may 
  784. also be used in math mode and appears on the Grouping submenu.
  785.  
  786.   TextStyle:textup
  787.   TextStyle:textit  <Cmd Shf I>
  788.   TextStyle:textsl  <Cmd Shf S>
  789.   TextStyle:textsc  <Cmd Shf H>
  790.  
  791. These four commands specify the SHAPE of their respective arguments.  
  792. They call for upright text, italics, slanted text, and small caps, 
  793. respectively.  Upright is the default.
  794.  
  795.   TextStyle:textmd
  796.   TextStyle:textbf  <Cmd Shf B>
  797.  
  798. These commands specify an attribute called the SERIES of the corresponding 
  799. font.  They call for medium and boldfaced text, respectively.  Medium is 
  800. the default.
  801.  
  802.   TextStyle:textrm  <Cmd Shf R>
  803.   TextStyle:textsf  <Cmd Shf W>
  804.   TextStyle:texttt  <Cmd Shf T>
  805.  
  806. The third and final component of any given font is the FAMILY.  There are 
  807. three families:  roman, sans serif, and typewriter.  Roman is the default.
  808.  
  809.   International:
  810.  
  811. latex.tcl implements about half of LaTeX's full palette of international 
  812. symbols and accents (if you can think of way to get the rest on the LaTeX 
  813. menu, please let me know!).  See Tables 3.1 and 3.2 on pp.38--39 of the 
  814. _LaTeX_ book for a complete list.
  815.  
  816.   Environments:enumerate        <Opt F7>
  817.   Environments:itemize          <Opt Shf F7>
  818.   Environments:description      <Opt Ctl F7>
  819.   Environments:thebibliography  <Cmd Opt F7>
  820.   Environments:slide            <Opt F8>
  821.   Environments:overlay          <Opt Shf F8>
  822.   Environments:note             <Opt Ctl F8>
  823.   Environments:figure           <Opt F9>
  824.   Environments:table            <Opt Shf F9>
  825.   Environments:tabular          <Opt Ctl F9>
  826.   Environments:verbatim         <Opt F10>
  827.   Environments:quote            <Opt Shf F10>
  828.   Environments:quotation        <Opt Ctl F10>
  829.   Environments:verse            <Cmd Opt F10>
  830.   Environments:flushleft        <Opt F11>
  831.   Environments:center           <Opt Shf F11>
  832.   Environments:flushright       <Opt Ctl F11>
  833.   Environments:general          <Opt F12>
  834.  
  835. Perhaps the most useful of latex.tcl's many features is its ability to 
  836. insert skeletal templates for multi-line environments (that is, LaTeX 
  837. constructs delimited by a \begin...\end pair).  These may be inserted 
  838. anywhere in the document (even in the middle of a line), complete with tab 
  839. stops and appropriate indentation (provided the Alpha variable 
  840. 'indentOnCR', available on the Mode:Flags submenu, is set to true).  In 
  841. some cases (like 'enumerate'), the user is asked to specify the number of 
  842. rows desired, after which the program generates the corresponding 
  843. environment body complete with punctuation and tab stops.  Some environment 
  844. commands (like 'tabular') also prompt the user for the desired number of 
  845. columns.  There's even a 'general' command for inserting user-defined 
  846. environments on the fly.
  847.  
  848. Note: The Environments submenu seeks to mimic the corresponding command 
  849. keys.  Each group of environments on this submenu has been assigned a 
  850. different function key, beginning with <F7>.  The 'general' environment, 
  851. for instance, is bound to <Opt F12>.  See "latex_commands.tex" for more 
  852. information.
  853.  
  854.   Boxes:mbox    <Cmd Shf M> or <Cmd Opt M>
  855.   Boxes:makebox
  856.  
  857. Perhaps the most useful box-making command is \mbox, which formats its 
  858. argument in LR mode, a restricted form of paragraph mode impervious to line 
  859. breaks.  The \mbox command is especially useful for inserting a bit of 
  860. plain text in the middle of a math formula (see the _LaTeX_ book for 
  861. examples).  The \makebox command is a generalized form of \mbox which takes 
  862. the width and height of the box as additional arguments.
  863.  
  864.   Boxes:fbox
  865.   Boxes:framebox
  866.  
  867. \fbox and \framebox are analogous to \mbox and \makebox except that a 
  868. rectangular frame is drawn around the box.
  869.  
  870.   Boxes:newsavebox
  871.   Boxes:sbox
  872.   Boxes:savebox
  873.   Boxes:usebox
  874.  
  875. A "savebox" is a bin for storing text, graphics, formulas, or whatever.  
  876. The argument to \sbox or \savebox is typeset *once* and may be recalled 
  877. later, any number of times, via \usebox.
  878.  
  879.   Boxes:raisebox
  880.  
  881. This box-making command takes a vertical offset as one of its arguments.
  882.  
  883.   Boxes:parbox
  884.   Boxes:minipage
  885.  
  886. The primary argument of LaTeX's parbox and minipage commands is typeset in 
  887. paragraph mode.  \parbox is for small amounts of text, while minipage is an 
  888. environment.
  889.  
  890.   Boxes:rule
  891.  
  892. \rule makes a box filled with ink.  For example,
  893.  
  894.      \newcommand{\filledsquare}{\rule[0.125ex]{1.3ex}{1.3ex}}
  895.  
  896. makes a black square approximately the same size as LaTeX's open \Box, but 
  897. without the need for the AMS fonts (wherein \blacksquare is defined 
  898. explicitly).
  899.  
  900.   Miscellaneous:ellipsis       <Opt ;>
  901.   Miscellaneous:en-dash
  902.   Miscellaneous:em-dash
  903.   Miscellaneous:TeXLogo
  904.   Miscellaneous:LaTeXLogo
  905.   Miscellaneous:LaTeX2eLogo
  906.   Miscellaneous:date
  907.  
  908.   Miscellaneous:dag            <Opt Shf T>
  909.   Miscellaneous:ddag
  910.   Miscellaneous:sectionMark    <Opt 6>
  911.   Miscellaneous:paragraphMark  <Opt 7>
  912.   Miscellaneous:copyright      <Opt Ctl G>
  913.   Miscellaneous:pounds
  914.  
  915. The previous six commands may be used in any mode, including math mode.
  916.  
  917.   Miscellaneous:quotes         <Cmd Shf '>
  918.   Miscellaneous:doubleQuotes   <Cmd Shf Opt '>
  919.  
  920. latex.tcl has a "smart quotes" feature (implemented by some unknown author 
  921. in "UserCode:smart.tcl") which makes the typing of quoted material totally 
  922. transparent.  Just use the quote key as you would for straight text files.  
  923. Consequently, the commands 'quotes' and 'doubleQuotes' are primarily used 
  924. for selecting and quoting existing text.
  925.  
  926.   Miscellaneous:marginalNote   <Cmd Shf N>
  927.   Miscellaneous:footnote       <Cmd Shf F>
  928.   Miscellaneous:label          <Cmd Shf L>
  929.   Miscellaneous:ref            <Cmd Shf X>
  930.   Miscellaneous:pageref        <Cmd Shf P>
  931.   Miscellaneous:cite           <Cmd Shf C>
  932.   Miscellaneous:item
  933.   Miscellaneous:bibitem
  934.  
  935. Other text-related LaTeX commands that I've found useful from time to time 
  936. are also listed under the Miscellaneous submenu. 
  937.  
  938.  
  939. Math Mode Commands
  940. ------------------
  941.  
  942.   MathMode:TeXMath
  943.   MathMode:TeXDisplaymath
  944.   MathMode:LaTeXMath         <Cmd Opt 4>
  945.   MathMode:LaTeXDisplaymath  <Cmd Shf Opt 4>
  946.  
  947. Math mode may be invoked in any number of ways. Many TeXnical typists rely 
  948. exclusively on TeX's use of dollar signs, and almost always key in their 
  949. documents horizontally from left to right. Others have adopted LaTeX's 
  950. tendency to prefer vertical constructions (that is, environments). Still 
  951. others have settled on some combination of these, using whichever seems 
  952. comfortable or convenient at the time. Whatever your approach to 
  953. mathematical typesetting, there's something for everybody in latex.tcl, 
  954. designed to simplify the input of complex mathematical formulas. 
  955.  
  956. Four Math Modes are available for normal, everyday left-to-right input.  
  957. These are called Tex Math ( $...$ ) and Tex Displaymath ( $$...$$ ), and 
  958. their corresponding LaTeX equivalents called Latex Math ( \(...\) ) and 
  959. Latex Displaymath ( \[...\] ).  The LaTeX versions are equivalent to the 
  960. multi-line 'math' and 'displaymath' environments (see below).  The latter 
  961. have the advantage that 1) they are often more readable in source form, and 
  962. 2) they are more easily changed (by simply replacing keywords) as the 
  963. document evolves.
  964.  
  965.   MathStyle:mathit             <Cmd Shf Opt I>
  966.   MathStyle:mathrm             <Cmd Shf Opt R>
  967.   MathStyle:mathbf             <Cmd Shf Opt B>
  968.   MathStyle:mathsf             <Cmd Shf Opt W>
  969.   MathStyle:mathtt
  970.   MathStyle:mathcal            <Cmd Shf Opt C>
  971.   MathStyle:displaystyle       <Opt ]>
  972.   MathStyle:textstyle          <Opt Shf ]>
  973.   MathStyle:scriptstyle        <Opt Ctl ]>
  974.   MathStyle:scriptscriptstyle  <Cmd Opt ]>
  975.  
  976. The next submenu on the LaTeX menu is called Math Style, with commands for 
  977. math italic, roman, boldface, sans serif, typewriter and calligraphic 
  978. typefaces, as well as declarations for displaystyle, textstyle, 
  979. scriptstyle, and scriptscriptstyle.  The latter command quartet are 
  980. sometimes needed to override LaTeX's default math style.  (The array 
  981. environment, for example, insists on enabling textstyle regardless of the 
  982. surrounding environment.) Future versions of latex.tcl will also provide 
  983. support for the AMS Fonts.
  984.  
  985.   MathEnvironments:math         <Opt F5>
  986.   MathEnvironments:displaymath  <Opt Shf F5>
  987.   MathEnvironments:equation     <Opt Ctl F5>
  988.   MathEnvironments:array        <Opt F6>
  989.   MathEnvironments:eqnarray*    <Opt Shf F6>
  990.   MathEnvironments:eqnarray     <Opt Ctl F6>
  991.   MathEnvironments:general      <Opt F12>
  992.  
  993. Other multi-line Math Environments ('equation', 'array', 'eqnarray', and 
  994. 'eqnarray*') are also available, and each is mutually exclusive (that is, 
  995. one may not be nested inside the other) except for the 'array' environment 
  996. which _must_ be nested inside some other math environment.  (It took me a 
  997. long time to come to grips with this anomaly).  There's also a 'general' 
  998. environment command which, for all practical purposes, is exactly the same 
  999. one available in paragraph mode (see above).
  1000.  
  1001.   Formulas:subscript      <Cmd Opt ,> or <Cmd Opt ->
  1002.   Formulas:superscript    <Cmd Opt .> or <Cmd Opt 6>
  1003.   Formulas:fraction       <Cmd Opt F> or <Cmd Opt />
  1004.   Formulas:squareRoot     <Cmd Opt R>
  1005.   Formulas:nthRoot        <Cmd Opt N>
  1006.   Formulas:oneParameter   <Cmd Shf \>
  1007.   Formulas:twoParameters  <Cmd Shf Opt \>
  1008.  
  1009. The Formulas submenu contains LaTeX commands commonly used to build up even 
  1010. the simplest mathematical expressions.  There are commands for typesetting 
  1011. subscripts and superscripts, fractions (which used to be difficult to 
  1012. typeset), square roots, and arbitrary nth roots.  There are also one- and 
  1013. two-parameter LaTeX commands which prompt the user to type in a command 
  1014. name.  Next to latex.tcl's environment commands, the formula commands are 
  1015. most useful.  (In fact, it pays to memorize their command key 
  1016. equivalents...but more on that later.)
  1017.  
  1018. While we're talking about the Formulas submenu, let me say a little bit 
  1019. about latex.tcl's ability to parse fractions. How many times have you found 
  1020. yourself wanting to recast a horizontally typeset fraction such as $x = (-b 
  1021. \pm \sqrt{b^2 - 4ac})/(2a)$ in a corresponding "vertical" form such as $$x 
  1022. = \frac{(-b \pm \sqrt{b^2 - 4ac})}{(2a)}$$? Obviously, such an operation 
  1023. involves a lot of cutting and pasting, and I used to avoid it like the 
  1024. plague. Well, now all you have to do is select the text you want converted 
  1025. (in this case, all the text inside the dollar signs except "x = ") and then 
  1026. choose Formulas:Fraction from the LaTeX menu. The rest is automatic. (Now 
  1027. if only I could get it to automatically remove those redundant 
  1028. parentheses... :-) 
  1029.  
  1030.   Greek:
  1031.  
  1032. The longest of latex.tcl's submenus contains the entire Greek alphabet, 
  1033. including both lower- and upper-case letters, plus a handful of lower-case 
  1034. "italicized" letters (\varepsilon, \vartheta, \varpi, \varrho, \varsigma, 
  1035. and \varphi).  Each of the Greek letters has a corresponding command key, 
  1036. the same command key assigned by the Macintosh Symbol font.  See 
  1037. "latex_commands.tex" or "latex_keys.tex" for a useful summary. 
  1038.  
  1039.   BinaryOperators:
  1040.   Relations:
  1041.  
  1042. Plain TeX defines an incredible variety of mathematical symbols, each 
  1043. transparently available to the LaTeX user.  All of these symbols have been 
  1044. implemented in this version of latex.tcl.
  1045.  
  1046.   Arrows:
  1047.   Dots:
  1048.   Symbols:
  1049.  
  1050. A quick glance at the _LaTeX_ book shows a wide assortment of arrows, dots, 
  1051. and miscellaneous mathematical symbols.  Starting with v2.2, all of these 
  1052. have been implemented in latex.tcl.  See the Arrows, Dots, and Symbols 
  1053. submenus for lists of available commands.
  1054.  
  1055.   Functions:
  1056.  
  1057. All of TeX's so-called "log-like" functions (\exp and \sin, for instance) 
  1058. have been implemented in this version of latex.tcl. 
  1059.  
  1060.   LargeOperators:
  1061.  
  1062. The latex.tcl macro package also provides support for TeX's so-called 
  1063. "large operators".  Commands such as 'sum', 'prod', 'int', 'bigcup', 
  1064. 'bigcap', 'bigvee', and 'bigwedge' may be found on the Large Operators 
  1065. submenu.
  1066.  
  1067.   Delimiters:
  1068.  
  1069. TeX is particularly adept at "delimiting" arbitrary-sized mathematical 
  1070. expressions.  Examples include parenthesized equations, matrices, and 
  1071. determinants.  Since the left and right delimiters need not be of the same 
  1072. type, there are a host of options from which to choose, and so we're 
  1073. presented with an interesting design problem.  A workable compromise was 
  1074. achieved by implementing a handful of common delimiters explicitly, and 
  1075. then providing access to other more esoteric combinations via dialogs.  
  1076. Consequently, commands for 'big parentheses', 'big brackets', 'big braces', 
  1077. and 'big vertical bars' (i.e., absolute value signs) will be found on the 
  1078. Delimiters submenu, along with a 'big left brace' (commonly used to define 
  1079. multi-part functions or systems of equations), as well as commands called 
  1080. 'other big delims' and 'other mixed big delims'.  The latter two commands 
  1081. are interactive---the user either types the delimiter name directly into a 
  1082. text box or chooses the desired name from a pop-up menu of available 
  1083. options.  Also on the Delimiters submenu are normal-sized 'parentheses', 
  1084. 'brackets', 'braces', 'vertical bars', and other fixed-size delimiters.
  1085.  
  1086.   MathAccents:
  1087.  
  1088. Math accents (not to be confused with diacritical marks used in paragraph 
  1089. mode) are accessed from a submenu of the same name. There are commands for 
  1090. hats, bars, tildes, vectors, dots, etc., plus wide hats and tildes. There 
  1091. are also commands for dotless versions of the letters "i" and "j" used in 
  1092. conjuction with these accents. Insofar as possible, the macros check to 
  1093. make sure that only single characters are being accented, or in the case of 
  1094. wide accents, three or fewer characters. 
  1095.  
  1096.   Grouping:
  1097.  
  1098. The Grouping submenu has commands for underlining and overlining, and 
  1099. related commands for underbraces and overbraces.  There's also a command 
  1100. called 'stackrel' used to construct compound operators via vertical 
  1101. stacking (see p.50 of the _LaTeX_ book for more information).
  1102.  
  1103.   Spacing:
  1104.  
  1105. The Spacing submenu provides for various types of horizontal spacing.  
  1106. There are commands for negative thin, thin, medium, and thick amounts of 
  1107. whitespace, and additional commands for inserting the traditional 
  1108. typesetter's quad (1em) and double quad.  Arbitrary horizontal whitespace, 
  1109. defined via LaTeX's \hspace command, and vertical whitespace via \vspace, 
  1110. may also be inserted from the Spacing submenu.  LaTeX's "fill" commands 
  1111. will also be found on this submenu.
  1112.  
  1113.  
  1114. ===========================================================================
  1115. COMMAND KEYS
  1116. ===========================================================================
  1117.  
  1118. Menus are great when first learning a program, but eventually the tendency 
  1119. is to move away from menus towards commands keys.  This can significantly 
  1120. speed the input process.  Few of us, however, are inclined to memorize more 
  1121. than a couple dozen such keystrokes unless continually prompted with 
  1122. reminders.  Unfortunately, it's not possible to display complex command key 
  1123. sequences on user-defined Alpha menus and so we must resort to external 
  1124. aids (see the files "latex_commands.tex" and "latex_commands.tex" in the 
  1125. LaTeX folder).  Other than that, a logical approach to key assignments is 
  1126. about all we can hope for.
  1127.  
  1128.  
  1129. Key Assignments
  1130. ---------------
  1131.  
  1132. A few remarks will help you remember the many command key sequences.  
  1133. Almost all commands that use 'wrapObject' have been assigned command keys 
  1134. beginning with either <Cmd Shf>, <Cmd Opt>, or <Cmd Shf Opt>.  The first 
  1135. of these is reserved for paragraph mode and the others for math mode.  On 
  1136. the other hand, commands that use 'insertObject' almost always have command 
  1137. keys beginning with <Opt>, <Opt Shf>, or <Opt Ctl>.  Knowing these simple 
  1138. facts helps tremendously.
  1139.  
  1140. In many cases, we've honored normal Mac keyboarding conventions.  For 
  1141. example, the 'ellipsis' command has been assigned <Opt ;>.  Similarly, the 
  1142. commands 'leq' ("less or equal") and 'geq' ("greater or equal") have been 
  1143. assigned <Opt ,> and <Opt .>, respectively.  All the Greek letters have 
  1144. been assigned standard Mac option keys.  There are other key sequences that 
  1145. you'll no doubt recognize, too.
  1146.  
  1147. There's also a certain amount of redundancy built in.  For example, the 
  1148. ubiquitous 'subscript' and 'superscript' commands each have a pair of 
  1149. command keys assigned to them, <Cmd Opt ,> and <Cmd Opt -> in the case of 
  1150. 'subscript', and <Cmd Opt .> and <Cmd Opt 6> for 'superscript'.  Take your 
  1151. pick!
  1152.  
  1153. See the files "latex_commands.tex" and "latex_commands.tex" for useful 
  1154. summaries.
  1155.  
  1156.  
  1157. Meta Keys
  1158. ---------
  1159.  
  1160. The LaTeX key bindings make heavy use of the option key.  This is fine
  1161. if you never learned those strange emacs-type key combinations, or if
  1162. you are accustomed to using the escape key for the meta-key combinations.
  1163. However, if you are taking advantage of Alpha's ability to use the option
  1164. key for the meta-key combinations (by setting optionIsMeta to 1), you
  1165. have undoubtedly noticed that you have a problem in TeX mode, where
  1166. <Opt V> inserts "\nabla" rather than scrolling up one screen.  
  1167.  
  1168. Fear not.  If you want to use option as a meta key in TeX mode, tick the 
  1169. 'optionIsMeta' flag on the "flag" pop-up menu at the right.  As a result, 
  1170. all the latex key bindings will have the control key added to them (except 
  1171. the tab and keypad keys), and option will work as a meta key.
  1172.  
  1173. NOTE:  latex.tcl was designed to be used with 'optionIsMeta' set to 
  1174. false.  Setting it to true will prevent you from using some of the command 
  1175. keys, namely those keys which are already being modified by the control key.
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194.  
  1195.  
  1196.  
  1197.  
  1198.  
  1199.  
  1200.  
  1201.  
  1202.  
  1203.